﻿/**
 * 
 * @file TreeEventOperator.h
 * @brief 树形菜单操作器抽象类
 * @author LiBaojun (libaojunqd@foxmail.com)
 * @date 2024-10-18
 * 
 */
#ifndef _TREE_EVENT_OPERATOR_H___
#define _TREE_EVENT_OPERATOR_H___
 

#include "FITK_Kernel/FITKCore/FITKAbstractOperator.h"
#include "FITK_Kernel/FITKCore/FITKOperatorRepo.h"
#include "OperatorsInterfaceAPI.h"

class QTreeWidgetItem;

namespace Oper
{ 
    /**
     * @brief 树形菜单操作器，抽象类
     * @author LiBaojun (libaojunqd@foxmail.com)
     * @date 2024-10-18
     */
    class OperatorsInterfaceAPI TreeEventOperator : public Core::FITKAbstractOperator
    {
    public:
        /**
         * @brief Construct a new Tree Event Operator object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-18
         */
        explicit TreeEventOperator() = default;
        /**
         * @brief Destroy the Tree Event Operator object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-18
         */
        virtual ~TreeEventOperator() = 0;
        /**
         * @brief 树形菜单点击事件
         * @param[i]  item           树形节点
         * @param[i]  colum          点击列号
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-18
         */
        virtual void itemClicked(QTreeWidgetItem* item, int colum);
        /**
         * @brief 树形菜单双击事件
         * @param[i]  item           树形节点
         * @param[i]  colum          点击列号
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-18
         */
        virtual void itemDouleClicked(QTreeWidgetItem* item, int colum);
        /**
         * @brief 树形菜单状态改变事件
         * @param[i] item 点击对象
         * @param[i] state 改变之后的状态
         * @param[i] column 列数
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-18
         */
        virtual void itemStateChanged(QTreeWidgetItem *item, bool state, int column);
        /**
         * @brief    更新模型树菜单状态[不会更新渲染，只根据当前数据显示状态刷新菜单状态]
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        virtual void updateModelTreeItemState();
        
    };

}


#endif
